package gui.selectplayers;

import javax.swing.JPanel;
import java.awt.Dimension;
import java.awt.GridBagLayout;
import javax.swing.JLabel;

import commondata.ITeam;

import java.awt.GridBagConstraints;
import java.awt.Font;
import java.awt.Insets;

/**
 * The Class TeamDetailsPanel.
 */
public class TeamDetailsPanel extends JPanel {

	/**
	 * 
	 */
	private static final long serialVersionUID = -7760133492417102145L;

	/** The team name label. */
	private JLabel teamNameLabel = null;

	/** The win label. */
	private JLabel winLabel = null;

	/** The lost label. */
	private JLabel lostLabel = null;

	/** The budget label. */
	private JLabel budgetLabel = null;

	/** The payroll label. */
	private JLabel payrollLabel = null;

	/** The win value label. */
	private JLabel winValueLabel = null;

	/** The lost value label. */
	private JLabel lostValueLabel = null;

	/** The budget value label. */
	private JLabel budgetValueLabel = null;

	/** The payroll value label. */
	private JLabel payrollValueLabel = null;

	/** The points label. */
	private JLabel pointsLabel = null;

	/** The assists label. */
	private JLabel assistsLabel = null;

	/** The rebounds label. */
	private JLabel reboundsLabel = null;

	/** The blocks label. */
	private JLabel blocksLabel = null;

	/** The points value label. */
	private JLabel pointsValueLabel = null;

	/** The assists value label. */
	private JLabel assistsValueLabel = null;

	/** The rebounds value label. */
	private JLabel reboundsValueLabel = null;

	/** The blocks value label. */
	private JLabel blocksValueLabel = null;

	/** The j label. */
	private JLabel jLabel = null;

	/**
	 * This method initializes.
	 */
	public TeamDetailsPanel() {
		super();
		initialize();
	}

	/**
	 * This method initializes this.
	 */
	private void initialize() {
		GridBagConstraints gridBagConstraints15 = new GridBagConstraints();
		gridBagConstraints15.gridx = 4;
		gridBagConstraints15.weightx = 1.0D;
		gridBagConstraints15.weighty = 1.0D;
		gridBagConstraints15.gridy = 6;
		jLabel = new JLabel();
		jLabel.setText(" ");
		GridBagConstraints gridBagConstraints14 = new GridBagConstraints();
		gridBagConstraints14.gridx = 3;
		gridBagConstraints14.anchor = GridBagConstraints.NORTHEAST;
		gridBagConstraints14.gridy = 5;
		blocksValueLabel = new JLabel();
		blocksValueLabel.setFont(new Font("DialogInput", Font.PLAIN, 12));
		blocksValueLabel.setText("41");
		GridBagConstraints gridBagConstraints13 = new GridBagConstraints();
		gridBagConstraints13.gridx = 3;
		gridBagConstraints13.anchor = GridBagConstraints.NORTHEAST;
		gridBagConstraints13.gridy = 4;
		reboundsValueLabel = new JLabel();
		reboundsValueLabel.setFont(new Font("DialogInput", Font.PLAIN, 12));
		reboundsValueLabel.setText("41");
		GridBagConstraints gridBagConstraints12 = new GridBagConstraints();
		gridBagConstraints12.gridx = 3;
		gridBagConstraints12.anchor = GridBagConstraints.NORTHEAST;
		gridBagConstraints12.gridy = 3;
		assistsValueLabel = new JLabel();
		assistsValueLabel.setFont(new Font("DialogInput", Font.PLAIN, 12));
		assistsValueLabel.setText("41");
		GridBagConstraints gridBagConstraints11 = new GridBagConstraints();
		gridBagConstraints11.gridx = 3;
		gridBagConstraints11.anchor = GridBagConstraints.NORTHEAST;
		gridBagConstraints11.gridy = 2;
		pointsValueLabel = new JLabel();
		pointsValueLabel.setFont(new Font("DialogInput", Font.PLAIN, 12));
		pointsValueLabel.setText("41");
		GridBagConstraints gridBagConstraints10 = new GridBagConstraints();
		gridBagConstraints10.gridx = 2;
		gridBagConstraints10.insets = new Insets(0, 10, 5, 0);
		gridBagConstraints10.anchor = GridBagConstraints.NORTHWEST;
		gridBagConstraints10.gridy = 5;
		blocksLabel = new JLabel();
		blocksLabel.setText("Blocks Per Game :");
		GridBagConstraints gridBagConstraints9 = new GridBagConstraints();
		gridBagConstraints9.gridx = 2;
		gridBagConstraints9.anchor = GridBagConstraints.NORTHWEST;
		gridBagConstraints9.insets = new Insets(0, 10, 5, 20);
		gridBagConstraints9.gridy = 4;
		reboundsLabel = new JLabel();
		reboundsLabel.setText("Rebounds Per Game :");
		GridBagConstraints gridBagConstraints8 = new GridBagConstraints();
		gridBagConstraints8.gridx = 2;
		gridBagConstraints8.anchor = GridBagConstraints.NORTHWEST;
		gridBagConstraints8.insets = new Insets(0, 10, 5, 0);
		gridBagConstraints8.gridy = 3;
		assistsLabel = new JLabel();
		assistsLabel.setText("Assists Per Game :");
		GridBagConstraints gridBagConstraints7 = new GridBagConstraints();
		gridBagConstraints7.gridx = 2;
		gridBagConstraints7.insets = new Insets(0, 10, 5, 0);
		gridBagConstraints7.anchor = GridBagConstraints.NORTHWEST;
		gridBagConstraints7.gridy = 2;
		pointsLabel = new JLabel();
		pointsLabel.setText("Points Per Game :");
		GridBagConstraints gridBagConstraints6 = new GridBagConstraints();
		gridBagConstraints6.gridx = 1;
		gridBagConstraints6.anchor = GridBagConstraints.NORTHEAST;
		gridBagConstraints6.insets = new Insets(0, 0, 0, 10);
		gridBagConstraints6.gridy = 5;
		payrollValueLabel = new JLabel();
		payrollValueLabel.setFont(new Font("DialogInput", Font.PLAIN, 12));
		payrollValueLabel.setText("55M");
		GridBagConstraints gridBagConstraints5 = new GridBagConstraints();
		gridBagConstraints5.gridx = 1;
		gridBagConstraints5.anchor = GridBagConstraints.NORTHEAST;
		gridBagConstraints5.insets = new Insets(0, 0, 0, 10);
		gridBagConstraints5.gridy = 4;
		budgetValueLabel = new JLabel();
		budgetValueLabel.setFont(new Font("DialogInput", Font.PLAIN, 12));
		budgetValueLabel.setText("55M");
		GridBagConstraints gridBagConstraints41 = new GridBagConstraints();
		gridBagConstraints41.gridx = 1;
		gridBagConstraints41.anchor = GridBagConstraints.NORTHEAST;
		gridBagConstraints41.insets = new Insets(0, 0, 0, 10);
		gridBagConstraints41.gridy = 3;
		lostValueLabel = new JLabel();
		lostValueLabel.setFont(new Font("DialogInput", Font.PLAIN, 12));
		lostValueLabel.setText("41");
		GridBagConstraints gridBagConstraints31 = new GridBagConstraints();
		gridBagConstraints31.gridx = 1;
		gridBagConstraints31.anchor = GridBagConstraints.NORTHEAST;
		gridBagConstraints31.insets = new Insets(0, 0, 0, 10);
		gridBagConstraints31.gridy = 2;
		winValueLabel = new JLabel();
		winValueLabel.setText("41");
		winValueLabel.setFont(new Font("DialogInput", Font.PLAIN, 12));
		GridBagConstraints gridBagConstraints4 = new GridBagConstraints();
		gridBagConstraints4.gridx = 0;
		gridBagConstraints4.anchor = GridBagConstraints.NORTHWEST;
		gridBagConstraints4.insets = new Insets(0, 10, 5, 0);
		gridBagConstraints4.gridy = 5;
		payrollLabel = new JLabel();
		payrollLabel.setText("Payroll ($):");
		GridBagConstraints gridBagConstraints3 = new GridBagConstraints();
		gridBagConstraints3.gridx = 0;
		gridBagConstraints3.anchor = GridBagConstraints.NORTHWEST;
		gridBagConstraints3.insets = new Insets(0, 10, 5, 20);
		gridBagConstraints3.gridy = 4;
		budgetLabel = new JLabel();
		budgetLabel.setText("Wage Budget ($):");
		GridBagConstraints gridBagConstraints2 = new GridBagConstraints();
		gridBagConstraints2.gridx = 0;
		gridBagConstraints2.anchor = GridBagConstraints.NORTHWEST;
		gridBagConstraints2.insets = new Insets(0, 10, 5, 0);
		gridBagConstraints2.gridy = 3;
		lostLabel = new JLabel();
		lostLabel.setText("Games Lost :");
		GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
		gridBagConstraints1.gridx = 0;
		gridBagConstraints1.anchor = GridBagConstraints.NORTHWEST;
		gridBagConstraints1.insets = new Insets(0, 10, 5, 0);
		gridBagConstraints1.gridy = 2;
		winLabel = new JLabel();
		winLabel.setText("Games Win :");
		GridBagConstraints gridBagConstraints = new GridBagConstraints();
		gridBagConstraints.gridx = 0;
		gridBagConstraints.gridheight = 2;
		gridBagConstraints.insets = new Insets(10, 10, 10, 0);
		gridBagConstraints.anchor = GridBagConstraints.NORTHWEST;
		gridBagConstraints.gridy = 0;
		teamNameLabel = new JLabel();
		teamNameLabel.setText("TEAM NAME");
		teamNameLabel.setFont(new Font("Arial Black", Font.BOLD, 14));
		this.setLayout(new GridBagLayout());
		this.setSize(new Dimension(605, 135));
		this.add(teamNameLabel, gridBagConstraints);
		this.add(winLabel, gridBagConstraints1);
		this.add(lostLabel, gridBagConstraints2);
		this.add(budgetLabel, gridBagConstraints3);
		this.add(payrollLabel, gridBagConstraints4);
		this.add(winValueLabel, gridBagConstraints31);
		this.add(lostValueLabel, gridBagConstraints41);
		this.add(budgetValueLabel, gridBagConstraints5);
		this.add(payrollValueLabel, gridBagConstraints6);
		this.add(pointsLabel, gridBagConstraints7);
		this.add(assistsLabel, gridBagConstraints8);
		this.add(reboundsLabel, gridBagConstraints9);
		this.add(blocksLabel, gridBagConstraints10);
		this.add(pointsValueLabel, gridBagConstraints11);
		this.add(assistsValueLabel, gridBagConstraints12);
		this.add(reboundsValueLabel, gridBagConstraints13);
		this.add(blocksValueLabel, gridBagConstraints14);
		this.add(jLabel, gridBagConstraints15);

	}

	/**
	 * Sets the team values.
	 * 
	 * @param team the new team values
	 */
	public void setTeamValues(ITeam team) {

		teamNameLabel.setText(team.getTeamName());
		winValueLabel.setText(String.valueOf(team.getWin()));
		lostValueLabel.setText(String.valueOf(team.getLoss()));
		payrollValueLabel.setText(String.valueOf(team.getTeamPayroll())+ " M");
		pointsValueLabel.setText(String.valueOf(team.getPointPG()));
		assistsValueLabel.setText(String.valueOf(team.getAssistPG()));
		reboundsValueLabel.setText(String.valueOf(team.getReboundPG()));
		blocksValueLabel.setText(String.valueOf(team.getBlockPG()));
	}

} //  @jve:decl-index=0:visual-constraint="-75,7"
